using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkAnalystTools._Analysis
{
    /// <summary>
    /// <para>Directions</para>
    /// <para>Generates turn-by-turn directions from a network analysis layer with routes. The directions can be written to a file in text, XML, or HTML format. If you provide an appropriate stylesheet, the directions can be written to any other file format.</para>
    /// <para>从具有路径的网络分析图层生成逐向方向。这些说明可以写入文本、XML 或 HTML 格式的文件。如果提供适当的样式表，则可以将说明写入任何其他文件格式。</para>
    /// </summary>    
    [DisplayName("Directions")]
    public class Directions : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Directions()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_network_analysis_layer">
        /// <para>Input Network Analysis Layer</para>
        /// <para>Network analysis layer for which directions will be generated. Directions can be generated only for route, closest facility, and vehicle routing problem network analysis layers.</para>
        /// <para>将为其生成方向的网络分析图层。只能为路径、最近设施点和车辆路径问题网络分析图层生成方向。</para>
        /// </param>
        /// <param name="_file_type">
        /// <para>Output File Type</para>
        /// <para><xdoc>
        ///   <para>The format of the output directions file. This parameter is ignored if the stylesheet parameter has a value.</para>
        ///   <bulletList>
        ///     <bullet_item>XML—The output directions file will be generated as an XML file. Apart from direction strings and the length and time information for the routes, the file will also contain information about the maneuver type and the turn angle for each direction.</bullet_item><para/>
        ///     <bullet_item>Text—The output directions file will be generated as a simple TXT file containing the direction strings, the length and, optionally, the time information for the routes.</bullet_item><para/>
        ///     <bullet_item>HTML—The output directions file will be generated as an HTML file containing the direction strings, the length and, optionally, the time information for the routes.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出方向文件的格式。如果样式表参数具有值，则忽略此参数。</para>
        ///   <bulletList>
        ///     <bullet_item>XML—输出方向文件将生成为 XML 文件。除了路线的方向字符串和长度和时间信息外，该文件还将包含有关每个方向的机动类型和转弯角度的信息。</bullet_item><para/>
        ///     <bullet_item>文本—输出方向文件将生成为一个简单的 TXT 文件，其中包含路径的方向字符串、长度和时间信息（可选）。</bullet_item><para/>
        ///     <bullet_item>HTML - 输出方向文件将生成为包含路径的方向字符串、长度和时间信息（可选）的 HTML 文件。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_directions_file">
        /// <para>Output Directions File</para>
        /// <para><xdoc>
        ///   <para>The full path to the directions file that will be written.</para>
        ///   <para>If you provide a stylesheet in the Stylesheet parameter, make sure the file suffix for Output Directions File matches the file type your stylesheet produces.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将要写入的 directions 文件的完整路径。</para>
        ///   <para>如果在样式表参数中提供了样式表，请确保输出方向文件的文件后缀与样式表生成的文件类型匹配。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_report_units">
        /// <para>Report Length in These Units</para>
        /// <para>Specifies the linear units in which the length information will be reported in the directions file. For example, even though your impedance was in meters, you can show directions in miles.</para>
        /// <para>指定在方向文件中报告长度信息的线性单位。例如，即使阻抗以米为单位，您也可以以英里为单位显示方向。</para>
        /// </param>
        public Directions(object _in_network_analysis_layer, _file_type_value _file_type, object _out_directions_file, _report_units_value? _report_units)
        {
            this._in_network_analysis_layer = _in_network_analysis_layer;
            this._file_type = _file_type;
            this._out_directions_file = _out_directions_file;
            this._report_units = _report_units;
        }
        public override string ToolboxName => "Network Analyst Tools";

        public override string ToolName => "Directions";

        public override string CallName => "na.Directions";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_network_analysis_layer, _file_type.GetGPValue(), _out_directions_file, _report_units.GetGPValue(), _report_time.GetGPValue(), _time_attribute, _language, _style_name.GetGPValue(), _stylesheet, _output_layer];

        /// <summary>
        /// <para>Input Network Analysis Layer</para>
        /// <para>Network analysis layer for which directions will be generated. Directions can be generated only for route, closest facility, and vehicle routing problem network analysis layers.</para>
        /// <para>将为其生成方向的网络分析图层。只能为路径、最近设施点和车辆路径问题网络分析图层生成方向。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network Analysis Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_network_analysis_layer { get; set; }


        /// <summary>
        /// <para>Output File Type</para>
        /// <para><xdoc>
        ///   <para>The format of the output directions file. This parameter is ignored if the stylesheet parameter has a value.</para>
        ///   <bulletList>
        ///     <bullet_item>XML—The output directions file will be generated as an XML file. Apart from direction strings and the length and time information for the routes, the file will also contain information about the maneuver type and the turn angle for each direction.</bullet_item><para/>
        ///     <bullet_item>Text—The output directions file will be generated as a simple TXT file containing the direction strings, the length and, optionally, the time information for the routes.</bullet_item><para/>
        ///     <bullet_item>HTML—The output directions file will be generated as an HTML file containing the direction strings, the length and, optionally, the time information for the routes.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出方向文件的格式。如果样式表参数具有值，则忽略此参数。</para>
        ///   <bulletList>
        ///     <bullet_item>XML—输出方向文件将生成为 XML 文件。除了路线的方向字符串和长度和时间信息外，该文件还将包含有关每个方向的机动类型和转弯角度的信息。</bullet_item><para/>
        ///     <bullet_item>文本—输出方向文件将生成为一个简单的 TXT 文件，其中包含路径的方向字符串、长度和时间信息（可选）。</bullet_item><para/>
        ///     <bullet_item>HTML - 输出方向文件将生成为包含路径的方向字符串、长度和时间信息（可选）的 HTML 文件。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output File Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _file_type_value _file_type { get; set; }

        public enum _file_type_value
        {
            /// <summary>
            /// <para>Text</para>
            /// <para>Text—The output directions file will be generated as a simple TXT file containing the direction strings, the length and, optionally, the time information for the routes.</para>
            /// <para>文本—输出方向文件将生成为一个简单的 TXT 文件，其中包含路径的方向字符串、长度和时间信息（可选）。</para>
            /// </summary>
            [Description("Text")]
            [GPEnumValue("TEXT")]
            _TEXT,

            /// <summary>
            /// <para>XML</para>
            /// <para>XML—The output directions file will be generated as an XML file. Apart from direction strings and the length and time information for the routes, the file will also contain information about the maneuver type and the turn angle for each direction.</para>
            /// <para>XML—输出方向文件将生成为 XML 文件。除了路线的方向字符串和长度和时间信息外，该文件还将包含有关每个方向的机动类型和转弯角度的信息。</para>
            /// </summary>
            [Description("XML")]
            [GPEnumValue("XML")]
            _XML,

            /// <summary>
            /// <para>HTML</para>
            /// <para>HTML—The output directions file will be generated as an HTML file containing the direction strings, the length and, optionally, the time information for the routes.</para>
            /// <para>HTML - 输出方向文件将生成为包含路径的方向字符串、长度和时间信息（可选）的 HTML 文件。</para>
            /// </summary>
            [Description("HTML")]
            [GPEnumValue("HTML")]
            _HTML,

        }

        /// <summary>
        /// <para>Output Directions File</para>
        /// <para><xdoc>
        ///   <para>The full path to the directions file that will be written.</para>
        ///   <para>If you provide a stylesheet in the Stylesheet parameter, make sure the file suffix for Output Directions File matches the file type your stylesheet produces.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将要写入的 directions 文件的完整路径。</para>
        ///   <para>如果在样式表参数中提供了样式表，请确保输出方向文件的文件后缀与样式表生成的文件类型匹配。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Directions File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_directions_file { get; set; }


        /// <summary>
        /// <para>Report Length in These Units</para>
        /// <para>Specifies the linear units in which the length information will be reported in the directions file. For example, even though your impedance was in meters, you can show directions in miles.</para>
        /// <para>指定在方向文件中报告长度信息的线性单位。例如，即使阻抗以米为单位，您也可以以英里为单位显示方向。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Report Length in These Units")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _report_units_value? _report_units { get; set; }

        public enum _report_units_value
        {
            /// <summary>
            /// <para>Feet</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Feet")]
            [GPEnumValue("Feet")]
            _Feet,

            /// <summary>
            /// <para>Yards</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Yards")]
            [GPEnumValue("Yards")]
            _Yards,

            /// <summary>
            /// <para>Miles</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Miles")]
            [GPEnumValue("Miles")]
            _Miles,

            /// <summary>
            /// <para>Meters</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Meters")]
            [GPEnumValue("Meters")]
            _Meters,

            /// <summary>
            /// <para>Kilometers</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Kilometers")]
            [GPEnumValue("Kilometers")]
            _Kilometers,

            /// <summary>
            /// <para>Nautical miles</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Nautical miles")]
            [GPEnumValue("NauticalMiles")]
            _NauticalMiles,

        }

        /// <summary>
        /// <para>Report Travel Time</para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>Checked—Report travel times in the directions file. This is the default value.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Do not report travel times in the directions file.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <bulletList>
        ///     <bullet_item>选中 - 在方向文件中报告行驶时间。这是默认值。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不在方向文件中报告行驶时间。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Report Travel Time")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _report_time_value _report_time { get; set; } = _report_time_value._true;

        public enum _report_time_value
        {
            /// <summary>
            /// <para>REPORT_TIME</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REPORT_TIME")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_REPORT_TIME</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_REPORT_TIME")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Time Attribute</para>
        /// <para>The time-based cost attribute to provide travel times in the directions. The cost attribute must exist on the network dataset used by the input network analysis layer.</para>
        /// <para>基于时间的成本属性，用于提供方向上的行驶时间。成本属性必须存在于输入网络分析图层使用的网络数据集上。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Attribute")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_attribute { get; set; } = null;


        /// <summary>
        /// <para>Language</para>
        /// <para><xdoc>
        ///   <para>Choose a language in which to generate driving directions.</para>
        ///   <para>The input for this parameter should be a two- or five-character language code representing one of the available languages for directions generation. In Python, you can retrieve a list of available language codes using the ListDirectionsLanguages function.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>选择用于生成行车路线的语言。</para>
        ///   <para>此参数的输入应为两个或五个字符的语言代码，表示用于生成方向的可用语言之一。在 Python 中，可以使用 ListDirectionsLanguages 函数检索可用语言代码的列表。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Language")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _language { get; set; } = null;


        /// <summary>
        /// <para>Style Name</para>
        /// <para><xdoc>
        ///   <para>Choose the name of the formatting style for the directions.</para>
        ///   <bulletList>
        ///     <bullet_item>Printable driving directions—Printable turn-by-turn directions</bullet_item><para/>
        ///     <bullet_item>Driving directions for a navigation device—Turn-by-turn directions designed for an in-vehicle navigation device</bullet_item><para/>
        ///     <bullet_item>Walking directions—Turn-by-turn walking directions, which are designed for pedestrian routes</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>选择方向的格式样式名称。</para>
        ///   <bulletList>
        ///     <bullet_item>可打印的行车路线 - 可打印的逐向行驶方向</bullet_item><para/>
        ///     <bullet_item>导航设备的行驶方向 - 为车载导航设备设计的转弯方向</bullet_item><para/>
        ///     <bullet_item>步行路线 - 专为人行道设计的转弯步行路线</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Style Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _style_name_value? _style_name { get; set; } = null;

        public enum _style_name_value
        {
            /// <summary>
            /// <para>Printable driving directions</para>
            /// <para>Printable driving directions—Printable turn-by-turn directions</para>
            /// <para>可打印的行车路线 - 可打印的逐向行驶方向</para>
            /// </summary>
            [Description("Printable driving directions")]
            [GPEnumValue("NA Desktop")]
            _NA_Desktop,

            /// <summary>
            /// <para>Driving directions for a navigation device</para>
            /// <para>Driving directions for a navigation device—Turn-by-turn directions designed for an in-vehicle navigation device</para>
            /// <para>导航设备的行驶方向 - 为车载导航设备设计的转弯方向</para>
            /// </summary>
            [Description("Driving directions for a navigation device")]
            [GPEnumValue("NA Navigation")]
            _NA_Navigation,

            /// <summary>
            /// <para>Walking directions</para>
            /// <para>Walking directions—Turn-by-turn walking directions, which are designed for pedestrian routes</para>
            /// <para>步行路线 - 专为人行道设计的转弯步行路线</para>
            /// </summary>
            [Description("Walking directions")]
            [GPEnumValue("NA Campus")]
            _NA_Campus,

        }

        /// <summary>
        /// <para>Stylesheet</para>
        /// <para><xdoc>
        ///   <para>The stylesheet for generating a formatted output file type (such as a PDF, Word, or HTML file). The suffix of the file in the output directions file parameter should match the file type that the stylesheet generates. The Directions tool overrides the output file type parameter if this parameter contains a value.</para>
        ///   <para>
        ///     <para>If you want a head start on creating your own text and HTML stylesheets, copy and edit the stylesheets Network Analyst uses. You can find them in the following directory: <ArcGIS installation directory>\ArcGIS\ArcGIS Pro\Resources\NetworkAnalyst\Directions\Styles. The stylesheet is Dir2PHTML.xsl, and the text stylesheet is Dir2PlainText.xsl.</para>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于生成格式化输出文件类型（如 PDF、Word 或 HTML 文件）的样式表。输出方向文件参数中文件的后缀应与样式表生成的文件类型匹配。如果输出文件类型参数包含值，则方向工具将覆盖此参数。</para>
        ///   <para>
        /// <para>如果您想在创建自己的文本和 HTML 样式表方面抢占先机，请复制并编辑 Network Analyst 使用的样式表。您可以在以下目录中找到它们：<ArcGIS 安装目录>\ArcGIS\ArcGIS Pro\Resources\NetworkAnalyst\Directions\Styles。样式表为 Dir2PHTML.xsl，文本样式表为 Dir2PlainText.xsl。</para>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Stylesheet")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _stylesheet { get; set; } = null;


        /// <summary>
        /// <para>Network Analysis Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Analysis Layer")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_layer { get; set; }


        public Directions SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}